<template>
  <div id="app">
    <el-row>
        <el-col :span="24" class="topbar-wrap">


            <div style="line-height: 50px;margin-left: 30px;cursor: pointer;color: #F7F7F7;float:right;margin-right:30px" @click="logout()">
                注销登录
            </div>
            <div style="line-height:50px;color:white;float:right"><span>当前用户：</span>{{name}}</div>
        </el-col>
    </el-row>
      <!--<el-col :span="24" class="topbar-wrap">-->
          <!--<div class="topbar-logo topbar-btn">-->
              <!--<a href="/"><img src="../assets/logo.png" style="width:42px;margin-top: 5px;"></a>-->
          <!--</div>-->
          <!--<div class="topbar-title topbar-btn">-->
              <!--<span>风车车的枫叶</span>-->
          <!--</div>-->
          <!--<div class="topbar-account topbar-btn">-->
              <!--<el-dropdown trigger="click">-->
                  <!--<span class="el-dropdown-link userinfo-inner"><i class="iconfont icon-user"></i> {{sysUserName}}  <i class="iconfont icon-down"></i></span>-->
                  <!--<el-dropdown-menu slot="dropdown">-->
                      <!--<el-dropdown-item><router-link to="/user/profile">个人信息</router-link></el-dropdown-item>-->
                      <!--<el-dropdown-item><router-link :to="'/user/changepwd'">修改密码</router-link></el-dropdown-item>-->
                      <!--<el-dropdown-item divided @click.native="logout">退出登录</el-dropdown-item>-->
                  <!--</el-dropdown-menu>-->
              <!--</el-dropdown>-->
          <!--</div>-->
      <!--</el-col>-->
      <!--<el-menu theme="dark" class="el-menu-demo" mode="horizontal">-->
          <!--<el-menu-item index="3" @click="logout()">退出</el-menu-item>-->
      <!--</el-menu>-->
    <el-row :gutter="2" class="leftMenu" >
        <!--<el-menu-item index="3"">退出</el-menu-item>-->
          <el-col :span="3">
              <el-menu  theme="dark"  :router="routeMap" class="el-menu-vertical-demo" unique-opened="true">
                  <!-- <el-submenu index="1" v-if="roleActionInfoList.app.tw_menu">
                      <template slot="title"><i class="el-icon-menu"></i>碳银网</template>
                      <el-menu-item index="/tw/expertList" v-if="roleActionInfoList.app.expert_list_menu">专家管理</el-menu-item>
                      <el-menu-item index="/tw/productList" v-if="roleActionInfoList.app.tw_product_list_menu">产品管理</el-menu-item>
                      <el-menu-item index="/tw/newsList">新闻管理</el-menu-item>
                  </el-submenu> -->
                  <!--<el-submenu index="2" v-if="roleActionInfoList.app.dt_menu">-->
                      <!--<template slot="title"><i class="el-icon-menu"></i>低碳中国</template>-->
                      <!--<el-menu-item index="/dt/newsList" v-if="roleActionInfoList.app.news_list_menu">新闻管理</el-menu-item>-->
                      <!--<el-menu-item index="/dt/pageList">模板管理</el-menu-item>-->
                      <!--<el-menu-item index="/dt/cellList">单元管理</el-menu-item>-->
                  <!--</el-submenu>-->

                  <!--<el-submenu index="4" >-->
                      <!--&lt;!&ndash;v-if="limit.limitId96.status==1"&ndash;&gt;-->
                      <!--<template slot="title" ><i class="el-icon-setting" ></i>后台账户管理</template>-->
                      <!--<el-menu-item index="/role/roleList">员工管理</el-menu-item>-->
                      <!--<el-menu-item index="/role/actionList">角色管理</el-menu-item>-->
                      <!--<el-menu-item index="/role/limitList" >权限管理</el-menu-item>-->
                  <!--</el-submenu>-->
                  <!--<el-submenu index="5">-->
                      <!--<template slot="title"><i class="el-icon-setting"></i>用户管理</template>-->
                      <!--<el-menu-item index="/user/userList">用户列表</el-menu-item>-->
                  <!--</el-submenu>-->
                  <!--<el-submenu index="6">-->
                      <!--<template slot="title"><i class="el-icon-setting"></i>系统管理</template>-->
                      <!--&lt;!&ndash; <el-menu-item index="/config/paramList" v-if="roleActionInfoList.app.sys_param_list_menu">字段管理</el-menu-item> &ndash;&gt;-->
                      <!--&lt;!&ndash; <el-menu-item index="/config/formTplList" v-if="roleActionInfoList.app.sys_form_tpl_list_menu">表单模板管理</el-menu-item> &ndash;&gt;-->
                      <!--<el-menu-item index="/config/dic/dicList">字典管理</el-menu-item>                      -->
                  <!--</el-submenu>-->
                  <el-submenu index="7">
                      <template slot="title"><i class="el-icon-setting"></i>工作台</template>
                      <!--<el-menu-item index="/working/inform" v-if="limit.limitId17.status==1">通知</el-menu-item>-->
                      <el-menu-item index="/working/pendingEnterprise" v-if="limit.limitId18.status==1">待审核的企业用户</el-menu-item>
                      <el-menu-item index="/working/pendingIndiv" v-if="limit.limitId47.status==1">待审核的个人用户</el-menu-item>
                      <!--<el-menu-item index="/working/pendingProduct">待审核的产品</el-menu-item>-->
                      <!--<el-menu-item index="/working/userInfoEdit">信息修改</el-menu-item>-->
                      <el-menu-item index="/working/userPwdEdit">密码修改</el-menu-item>
                  </el-submenu>
                  <el-submenu index="8">
                      <template slot="title"><i class="el-icon-star-on"></i>客户管理</template>
                      <el-menu-item index="/cust/company/companyList">企业</el-menu-item>
                      <el-menu-item index="/cust/peleList">个人</el-menu-item>
                      <el-menu-item index="/cust/case/caseList">案例管理</el-menu-item>
                      <!--<el-menu-item index="/cust/noCompany/noCompanyList">非企业</el-menu-item>-->
                  </el-submenu>
                  <!--<el-submenu index="9">-->
                      <!--<template slot="title"><i class="el-icon-setting"></i>产品管理</template>-->
                      <!--<el-menu-item index="/product/productList">产品列表</el-menu-item>-->
                  <!--</el-submenu>-->
                  <el-submenu index="14">
                      <template slot="title"><i class="el-icon-menu"></i>生态图谱</template>
                      <el-menu-item index="/ecological/guangfu">光伏</el-menu-item>
                      <el-menu-item index="/ecological/wuni">污泥</el-menu-item>
                      <!--<el-menu-item index="/cust/noCompany/noCompanyList">非企业</el-menu-item>-->
                  </el-submenu>
                  <el-submenu index="9">
                      <template slot="title"><i class="el-icon-edit"></i>文章管理</template>
                      <el-menu-item index="/ariticle/article">文章管理</el-menu-item>
                      <el-menu-item index="/ariticle/programa">栏目管理</el-menu-item>
                      <!--<el-menu-item index="/cust/noCompany/noCompanyList">非企业</el-menu-item>-->
                  </el-submenu>
                  <el-submenu index="10">
                      <template slot="title"><i class="el-icon-document"></i>文件管理</template>
                      <el-menu-item index="/material/material">文件管理</el-menu-item>
                      <el-menu-item index="/material/zlprograma">栏目管理</el-menu-item>
                      <!--<el-menu-item index="/cust/noCompany/noCompanyList">非企业</el-menu-item>-->
                  </el-submenu>
                  <el-submenu index="11">
                      <template slot="title"><i class="el-icon-star-off"></i>活动管理</template>
                      <el-menu-item index="/activity/activity">活动管理</el-menu-item>
                      <!--<el-menu-item index="/cust/peleList">栏目管理</el-menu-item>-->
                      <!--<el-menu-item index="/cust/noCompany/noCompanyList">非企业</el-menu-item>-->
                  </el-submenu>
                  <el-submenu index="12">
                      <template slot="title"><i class="el-icon-message"></i>消息管理</template>
                      <el-menu-item index="/message/message">消息管理</el-menu-item>
                      <!--<el-menu-item index="/cust/peleList">栏目管理</el-menu-item>-->
                      <!--<el-menu-item index="/cust/noCompany/noCompanyList">非企业</el-menu-item>-->
                  </el-submenu>
                  <el-submenu index="13">
                      <template slot="title"><i class="el-icon-upload2"></i>工单管理</template>
                      <el-menu-item index="/workOrder/workOfirst">工单管理</el-menu-item>
                      <!--<el-menu-item index="/cust/peleList">栏目管理</el-menu-item>-->
                      <!--<el-menu-item index="/cust/noCompany/noCompanyList">非企业</el-menu-item>-->
                  </el-submenu>
              </el-menu>
              <!--/workOrder/workOfirst-->
          </el-col>
          <el-col :span="19">
             <!--<keep-alive>-->
              <router-view>dddd</router-view>
              <!--<keep-alive>-->
                  <!--<router-view v-if="($route.meta.keepAlive?$route.meta.keepAlive:0)"></router-view>-->
              <!--</keep-alive>-->
              <!--<router-view v-if="$route.meta.keepAlive?0:1"></router-view>-->
            <!--</keep-alive>-->
          </el-col>
      </el-row>
  </div>
</template>
<script>
import _roleAction from './components/common/roleAction.vue'
export default {
  data() {
      return {
          name:'',
//        roleActionInfoList:_roleAction.getRoleActionFlag(this,'app'),
        routeMap:true,
        activeIndex: '1',
        activeIndex2: '1',
          limit:''
      };
    },
  mounted(){
      this.limit=JSON.parse(localStorage.getItem("limitList"))
      this.name = localStorage.getItem('userName')
  },
  methods: {
    handleSelect(key, keyPath) {
      console.log(key, keyPath);
    },
    logout(){
      sessionStorage.clear()
      window.location.href="/"
    }
  }
}
</script>
<style>
 .leftMenu{
  margin-top: 5px;
 }
 .topbar-wrap {
     height: 50px;
     line-height: 50px;
     background: #324157;
     padding: 0px;
 }
</style>

